<?php 


class Product_Widgets_ProductShowcase_Widget extends Tomato_Widget 
{
	protected function _prepareShow() 
	{
            
            $categoryIds = $this->_request->getParam('category_ids');
            $productLimit = $this->_request->getParam('product_limit');
            $categoryLimit = $this->_request->getParam('category_limit');
            $isCategoryFeatured = $this->_request->getParam('only_category_featured');
            $isProductFeatured = $this->_request->getParam('only_product_featured');
            $categoryOrdering = $this->_request->getParam('category_ordering');
            $productOrdering = $this->_request->getParam('product_ordering');

            $helper = new Product_Widgets_ProductShowcase_Helper();
            $categories = $helper->getCategories($categoryIds, $categoryLimit, $productLimit, $categoryOrdering, $productOrdering, $isCategoryFeatured, $isProductFeatured);
            $this->_view->assign('categories', $categories);
	}
}
